import setting from '@/config/base';

const isLogin = () => {
  return !!localStorage.getItem(setting.tokenStoreName);
};

const getToken = () => {
  return localStorage.getItem(setting.tokenStoreName);
};

const setToken = (token: string) => {
  localStorage.setItem(setting.tokenStoreName, token);
};

const clearToken = () => {
  localStorage.removeItem(setting.tokenStoreName);
};

export { isLogin, getToken, setToken, clearToken };
